package com.sdp.th.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 烟感报警日志
 * </p>
 *
 * @author zsp
 * @since 2025-04-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("th_eq_alarm_smoke_log")
public class ThEqAlarmSmokeLog extends Model<ThEqAlarmSmokeLog> {

    private static final long serialVersionUID=1L;

    /**
     *  内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 设备编码
     */
    @TableField("device_no")
    private String deviceNo;

    /**
     * 区域
     */
    @TableField("device_region")
    private String deviceRegion;

    /**
     * 房间
     */
    @TableField("device_room")
    private String deviceRoom;

    /**
     * 处理状态
     */
    @TableField("alarm_action")
    private String alarmAction;

    /**
     * 处理类型
     */
    @TableField("action_type")
    private String actionType;

    /**
     * 处理结果
     */
    @TableField("action_result")
    private String actionResult;

    /**
     * 处理时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("action_time")
    private LocalDateTime actionTime;

    /**
     * 处理人工号
     */
    @TableField("action_emp_no")
    private String actionEmpNo;

    /**
     * 处理人姓名
     */
    @TableField("action_emp_name")
    private String actionEmpName;

    /**
     * 时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 设备名称
     */
    @TableField("device_name")
    private String deviceName;

    /**
     * 组织
     */
    @TableField("org_no")
    private String orgNo;
    
    /**
     * 原始报文
     */
    @TableField("original_message")
    private String originalMessage;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
